import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)


export default new Router({
  // mode:'history',
  routes: [
    {              //404页面
      path: '*',
      component: resolve => require(['@/components/page/Error'], resolve)
    },
    {              //login页面
      path: '/login',
      name: 'login',
      component: resolve => require(['@/components/page/login'], resolve),
      meta: {
        title: '登录'
      }
    },
    {              //首页banner
      path: '/banner',
      name: 'Banner',
      component: resolve => require(['@/components/common/Banner'], resolve)
    },
    {              //广告
      path: '/adv',
      name: 'adv',
      component: resolve => require(['@/components/common/adv'], resolve)
    },
    {              //日期
      path: '/Date',
      name: 'Date',
      component: resolve => require(['@/components/common/Date'], resolve)
    },
    {              //生日             
      path: '/birthDate',
      name: 'birthDate',
      component: resolve => require(['@/components/common/birthDate'], resolve)
    },
    {              //省市
      path: '/city',
      name: 'city',
      component: resolve => require(['@/components/common/city'],resolve),
      meta: {
        title: '省市'
      }
    },
    {              // 图片放大
      path: '/bigImg',
      name: 'bigImg',
      component: resolve => require(['@/components/common/bigImg'], resolve),
      meta: {
        title: '大图'
      }
    },  
    {              // 图片放大
      path: '/qrcode',
      name: 'Qrcode',
      component: resolve => require(['@/components/page/user/qrcode'], resolve),
      meta: {
        title: '二维码'
      }
    },   
    // {              //用户 —— 首页
    //   path: '/',
    //   name: 'Index',
    //   component: resolve => require(['@/components/page/home/Index'], resolve),
    //   meta: {
    //     title: '首页'
    //   }
    // },

    {              //用户 —— 首页
      path: '/',
      name: 'home',
      component: resolve => require(['@/components/page/home/home'], resolve),
      meta: {
        title: '首页'
      }
    },
    {              //用户 —— 外部清洗
      path: '/external',
      name: 'external',
      component: resolve => require(['@/components/page/home/external'], resolve),
      meta: {
        title: '服务清洗'
      }
    },
    // {              //用户 —— 内外清洗
    //   path: '/inside',
    //   name: 'inside',
    //   component: resolve => require(['@/components/page/home/inside'], resolve),
    //   meta: {
    //     title: '内外清洗'
    //   }
    // },
    {              //用户 —— 搜索
      path: '/search',
      name: 'Search',
      component: resolve => require(['@/components/page/home/Search'], resolve),
      meta: {
        title: '搜索'
      }
    },
    {              //用户 —— 活动
      path: '/Active',
      name: 'Active',
      component: resolve => require(['@/components/page/home/Active'], resolve),
      meta: {
        title: '活动'
      }
    },
    {              //用户 —— 活动详情
      path: '/Actived',
      name: 'ActiveDetail',
      component: resolve => require(['@/components/page/home/ActiveDetail'], resolve),
      meta: {
        title: '活动'
      }
    },
    {              //用户 —— 订单列表
      path: '/Order',
      name: 'Order',
      component: resolve => require(['@/components/page/home/Order'], resolve),
      meta: {
        title: '我的订单'
      }
    },
    {              //用户 —— 订单详情 —— 进行中
      path: '/Ordering',
      name: 'Ordering',
      component: resolve => require(['@/components/page/home/Ordering'], resolve),
      meta: {
        title: '进行中'
      }
    },
    {              //用户 —— 订单确认
      path: '/Orderfirm',
      name: 'OrderFirm',
      component: resolve => require(['@/components/page/home/OrderFirm'], resolve),
      meta: {
        title: '确认订单'
      }
    },
    {              //用户 —— 订单详情 —— 完成
      path: '/OrderOver',
      name: 'OrderOver',
      component: resolve => require(['@/components/page/home/OrderOver'], resolve),
      meta: {
        title: '订单详情'
      }
    },
    {              //用户 —— 订单详情 —— 取消中
      path: '/OrderCanceling',
      name: 'OrderCanceling',
      component: resolve => require(['@/components/page/home/OrderCanceling'], resolve),
      meta: {
        title: '取消订单'
      }
    },
    {              //用户 —— 订单详情 —— 取消
      path: '/OrderCancel',
      name: 'OrderCancel',
      component: resolve => require(['@/components/page/home/OrderCancel'], resolve),
      meta: {
        title: '订单详情'
      }
    },
    {              //用户 —— 办卡
      path: '/Card',
      name: 'Card',
      component: resolve => require(['@/components/page/home/Card'], resolve),
      meta: {
        title: '办卡'
      }
    },
    {              //用户 —— 充值
      path: '/Recharge',
      name: 'Recharge',
      component: resolve => require(['@/components/page/home/Recharge'], resolve),
      meta: {
        title: '充值'
      }
    },
    {              //用户 —— 小伙伴详情
      path: '/Partner',
      name: 'Partner',
      component: resolve => require(['@/components/page/home/Partner'], resolve),
      meta: {
        title: '小伙伴'
      }
    },
    {              //用户 —— 预约
      path: '/Confirm',
      name: 'Confirm',
      component: resolve => require(['@/components/page/home/Confirm'], resolve),
      meta: {
        title: '预约',
        // keepAlive: true
      }
    },
    {              //用户 —— 车辆选择
      path: '/Vehicle',
      name: 'Vehicle',
      component: resolve => require(['@/components/page/home/Vehicle'], resolve),
      meta: {
        title: '车辆选择'
      }
    },
    {              //用户 —— 车辆增加
      path: '/VehicleAdd',
      name: 'VehicleAdd',
      component: resolve => require(['@/components/page/home/VehicleAdd'], resolve),
      meta: {
        title: '车辆管理'
      }
    },
    {              //用户 —— 车辆增加
      path: '/ChooseCar',
      name: 'ChooseCar',
      component: resolve => require(['@/components/page/home/ChooseCar'], resolve),
      meta: {
        title: '车型选择'
      }
    },
    {              //用户 —— 车辆增加
      path: '/SearchCar',
      name: 'SearchCar',
      component: resolve => require(['@/components/page/home/SearchCar'], resolve),
      meta: {
        title: '车型搜索'
      }
    },
    {              //用户 —— 地址选择
      path: '/Address',
      name: 'Address',
      component: resolve => require(['@/components/page/home/Address'], resolve),
      meta: {
        title: '地址选择'
      }
    },
    {              //用户 —— 地址增加
      path: '/addressAdd',
      name: 'addressAdd',
      component: resolve => require(['@/components/page/home/AddressAdd'], resolve),
      meta: {
        title: '地址管理'
      }
    },
    {              //用户 —— 个人中心
      path: '/user',
      name: 'user',
      component: resolve => require(['@/components/page/user/user'], resolve),
      meta: {
        // title: '个人资料'
        title: '个人中心'
      }
    },
    {              //用户 —— 我的爱车
      path: '/carLove',
      name: 'carLove',
      component: resolve => require(['@/components/page/user/carLove'], resolve),
      meta: {
        title: '我的爱车'
      }
    },
    {              //用户 —— 我的小伙伴
      path: '/buddy',
      name: 'buddy',
      component: resolve => require(['@/components/page/user/buddy'], resolve),
      meta: {
        title: '我的小伙伴'
      }
    },
    {              //用户 —— 我的优惠券
      path: '/coupon',
      name: 'coupon',
      component: resolve => require(['@/components/page/user/coupon'], resolve),
      meta: {
        title: '我的优惠券'
      }
    },
    {              //用户 —— 我的会员卡
      path: '/memberCard',
      name: 'memberCard',
      component: resolve => require(['@/components/page/user/memberCard'], resolve),
      meta: {
        title: '我的会员卡'
      }
    },
    {              //用户 —— 地址管理
      path: '/addressManage',
      name: 'addressManage',
      component: resolve => require(['@/components/page/user/addressManage'], resolve),
      meta: {
        title: '地址管理'
      }
    },
    {              //用户 —— 常见问题 —— 列表
      path: '/problem',
      name: 'problem',
      component: resolve => require(['@/components/page/user/problem'], resolve),
      meta: {
        title: '常见问题'
      }
    },
    {              //用户 —— 常见问题 —— 详情
      path: '/problemDetail',
      name: 'problemDetail',
      component: resolve => require(['@/components/page/user/problemDetail'], resolve),
      meta: {
        title: '常见问题'
      }
    },
    {              //用户 —— 充值记录
      path: '/rechargeRecord',
      name: 'rechargeRecord',
      component: resolve => require(['@/components/page/user/rechargeRecord'], resolve),
      meta: {
        title: '充值记录'
      }
    },
    {              //用户 —— 订单取消政策
      path: '/policy',
      name: 'policy',
      // component: enter,
      component: resolve => require(['@/components/page/user/policy'],resolve),
      meta: {
        title: '订单取消政策'
      }
    },
    {              //用户 —— 申请入驻
      path: '/enter',
      name: 'enter',
      // component: enter,
      component: resolve => require(['@/components/page/user/enter'],resolve),
      meta: {
        title: '申请入驻',
        keepAlive: true
      }
    },
    {              //用户 —— 申请入驻
      path: '/enterRevise',
      name: 'enterRevise',
      component: resolve => require(['@/components/page/user/enterRevise'], resolve),
      meta: {
        title: '申请审核中'
      }
    },
    {              //用户 —— 申请入驻
      path: '/enterOver',
      name: 'enterOver',
      // component: enter,
      component: resolve => require(['@/components/page/user/enterOver'],resolve),
      meta: {
        title: '申请完成'
      }
    },
    {              //用户 —— 申请须知
      path: '/guide',
      name: 'guide',
      // component: enter,
      component: resolve => require(['@/components/page/user/guide'],resolve),
      meta: {
        title: '申请须知'
      }
    },
    {              //用户 —— 申请代理商
      path: '/agent',
      name: 'agent',
      component: resolve => require(['@/components/page/user/agent'], resolve),
      meta: {
        title: '申请城市合伙人'
      }
    },
    {              //用户 —— 消息中心
      path: '/news',
      name: 'news',
      component: resolve => require(['@/components/page/user/news'], resolve),
      meta: {
        title: '消息中心'
      }
    },
    {              //用户 —— 余额
      path: '/balance',
      name: 'balance',
      component: resolve => require(['@/components/page/user/balance'], resolve),
      meta: {
        title: '余额'
      }
    },
    {              //用户 —— 个人资料
      path: '/data',
      name: 'data',
      component: resolve => require(['@/components/page/user/data'], resolve),
      meta: {
        title: '个人资料'
      }
    },
    {              //小伙伴 —— 首页订单
      path: '/wash',
      name: 'wash',
      component: resolve => require(['@/components/wash/home/washindex'], resolve),
      meta: {
        title: '首页'
      }
    },
    {              //小伙伴 —— 订单详情 —— 进行中
      path: '/washordering',
      // path: '/washordering/:order_id',
      name: 'washordering',
      component: resolve => require(['@/components/wash/home/washordering'], resolve),
      meta: {
        title: '进行中'
      }
    },
    {              //小伙伴 —— 订单详情 —— 取消确认
      path: '/washorderCanceling',
      name: 'washorderCanceling',
      component: resolve => require(['@/components/wash/home/washorderCanceling'], resolve),
      meta: {
        title: '取消订单'
      }
    },
    {              //小伙伴 —— 订单详情 —— 取消
      path: '/washorderCancel',
      name: 'washorderCancel',
      component: resolve => require(['@/components/wash/home/washorderCancel'], resolve),
      meta: {
        title: '取消详情'
      }
    },
    {              //小伙伴 —— 订单详情 —— 完成
      path: '/washorderOver',
      name: 'washorderOver',
      component: resolve => require(['@/components/wash/home/washorderOver'], resolve),
      meta: {
        title: '订单详情'
      }
    },
    {              //小伙伴 —— 个人中心
      path: '/washuser',
      name: 'washuser',
      component: resolve => require(['@/components/wash/user/washuser'], resolve),
      meta: {
        title: '小伙伴'
      }
    },
    {              //小伙伴 —— 收支明细
      path: '/washincome',
      name: 'washincome',
      component: resolve => require(['@/components/wash/user/washincome'], resolve),
      meta: {
        title: '收支明细'
      }
    },
    {              //小伙伴 —— 申请提现
      path: '/washwithdraw',
      name: 'washwithdraw',
      component: resolve => require(['@/components/wash/user/washwithdraw'], resolve),
      meta: {
        title: '申请提现'
      }
    },
    {              //小伙伴 —— 个人资料
      path: '/washdata',
      name: 'washdata',
      component: resolve => require(['@/components/wash/user/washdata'], resolve),
      meta: {
        title: '个人资料'
      }
    },
    {              //小伙伴 —— 客户评价
      path: '/washevaluate',
      name: 'washevaluate',
      component: resolve => require(['@/components/wash/user/washevaluate'], resolve),
      meta: {
        title: '客户评价'
      }
    },
    {              //小伙伴 —— 客户评价
      path: '/washservice',
      name: 'washservice',
      component: resolve => require(['@/components/wash/user/washservice'], resolve),
      meta: {
        title: '服务标准'
      }
    },
    {              //小伙伴 —— 企业公告
      path: '/washnotice',
      name: 'washnotice',
      component: resolve => require(['@/components/wash/user/washnotice'], resolve),
      meta: {
        title: '企业公告'
      }
    },
    {              //小伙伴 —— 企业公告
      path: '/washNoticeDetail',
      name: 'washNoticeDetail',
      component: resolve => require(['@/components/wash/user/washnoticedetail'], resolve),
      meta: {
        title: '企业公告'
      }
    },    
    {              //小伙伴 —— 提现须知
      path: '/washDrawNotice',
      name: 'washDrawNotice',
      component: resolve => require(['@/components/wash/user/washdrawnotice'], resolve),
      meta: {
        title: '提现须知'
      }
    },
  ]
})
